#include "stdio.h"
int DoWork(int x, int y, int z)
{
	int k = 0, j = 0;
	if ((x>3) && (z<10))
	{
		k = x*y - 1;
		j = k*2;
	}
	if ((x == 4) || (y>5))
	{
		j = x*y + 10;
	}
	j = j % 3;
	return j;
}
void printTestReport(int run,int test[10][4])
{
	int result=0;
	int testRunIndex=0;
	int paramterX,paramterY,paramterZ,expectedResult;
	printf("//------------This is the test report for whitebox test-------------// \n");
	for(testRunIndex=0;testRunIndex<run;testRunIndex++)
	{
		paramterX=test[testRunIndex][0];
		paramterY=test[testRunIndex][1];
		paramterZ=test[testRunIndex][2];
		expectedResult=test[testRunIndex][3];
		result = DoWork(paramterX,paramterY,paramterZ);	
		if(result!=expectedResult)
		{
			printf(" ----TESTCASE %d----- \n",testRunIndex);
			printf(" The test case %d test fail \n",testRunIndex);
			printf(" The actual result is %d \n",result);
			printf(" The expected result is %d \n",expectedResult);
			printf(" ----TESTCASE----- \n",testRunIndex);
		}
		else
		{
			printf(" ----TESTCASE %d----- \n",testRunIndex);
			printf(" The test case %d test pass \n",testRunIndex);
			printf(" The actual result is %d \n",result);
			printf(" The expected result is %d \n",expectedResult);
			printf(" ----TESTCASE----- \n",testRunIndex);
		}
	}	
	printf("//------------This is the end of test report for whitebox test-------------// \n");
}
int main()
{	
	int result = 0;
	int testRunIndex=0;
	//------------TestInput-----------------------------------//
	//--The test input for module DoWork----------------------//
	//-{parameter X,parameter Y,parameter Z,expected result}--//
	int testCase[10][4]	= 
	{
		{5,5,11,0},//The real example of test case 1
		{6,7,9,1},//The real example of test case 2
		{8,2,1,0},//The real example of test case 3
		{4,0,3,1},//The real example of test case 4
	};
    printTestReport(4,testCase);
	return 0;
}
